import request from '@/utils/request'

export function plan_view_list(project_id) {
  return request({
    url: `/admin/view_list?project_id=${project_id}`,
    method: 'get'
  })
}

export function sensor_in_view(project_id, view_id) {
  return request({
    url: `/admin/sensor_in_view?project_id=${project_id}&view_id=${view_id}`,
    method: 'get'
  })
}

export function view_edit(data) {
  return request({
    url: `/admin/view_edit`,
    method: 'post',
    data: data
  })
}

export function view_info(view_id) {
  return request({
    url: `/admin/view_info?view_id=${view_id}`,
    method: 'get'
  })
}
export function view_sensors(view_id) {
  return request({
    url: `/admin/view_sensors?view_id=${view_id}`,
    method: 'get'
  })
}

export function view_mark(view_id, data) {
  return request({
    url: `/admin/view_mark?view_id=${view_id}`,
    method: 'post',
    data: data
  })
}

export function view_show(project_id, view_id) {
  return request({
    url: `/admin/view_show?project_id=${project_id}&view_id=${view_id}`,
    method: 'get'
  })
}
